import PropTypes from "prop-types";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import sty from "./index.module.scss";

export default function BottomBtn({ title, icon, cls, itemClick }) {
  return (
    <button className={`${sty.bottomBtnWrap} p-2 ${cls}`} onClick={itemClick}>
      <FontAwesomeIcon icon={icon} />
      <span className={sty.btnText}>{title}</span>
    </button>
  );
}

BottomBtn.proptype = {
  title: PropTypes.string,
  icon: PropTypes.element.isRequired,
  cls: PropTypes.string,
  itemClick: PropTypes.func,
};

BottomBtn.defaultProps = {
  title: "",
  cls: "",
  itemClick: () => void 0,
};
